//router的入口文件
const Router = require('koa-router')
const category = require('./category')
const user = require('./user')
const dynamic = require('./dynamic')
const goods = require('./goods')
const address = require('./address')
const router = new Router()


// router.get('/',async(ctx)=>{
//     ctx.body = "首页"
// })

router.use('/category', category.routes(), category.allowedMethods());
router.use('/user', user.routes(), user.allowedMethods());
router.use('/dynamic', dynamic.routes(), dynamic.allowedMethods());
router.use('/goods', goods.routes(), goods.allowedMethods());
router.use('/address', address.routes(), address.allowedMethods());
// 路由重定向
// router.redirect('/', '/home');
module.exports=router;